export default {
	toPage(url, isTab = false, force = false) {
		if (force) {
			uni.reLaunch({
				url: url
			});
		} else {
			if (isTab) {
				uni.switchTab({
					url: url
				});
			} else {
				uni.navigateTo({
					url: url
				});
			}
		}
	},
	toHome(force = false) {
		if (force) {
			uni.reLaunch({
				url: '/pages/index/index'
			});
		} else {
			uni.switchTab({
				url: '/pages/index/index'
			});
		}
	},
	toMemberCardOrder(force = false) {
		if (force) {
			uni.reLaunch({
				url: '/pages/member_card_order/list'
			});
		} else {
			uni.navigateTo({
				url: '/pages/member_card_order/list'
			});
		}
	},
	toCoachOrder(force = false) {
		if (force) {
			uni.reLaunch({
				url: '/pages/coach_order/list'
			});
		} else {
			uni.navigateTo({
				url: '/pages/coach_order/list'
			});
		}
	},
	toGroupCourseOrder(force = false) {
		if (force) {
			uni.reLaunch({
				url: '/pages/group_course_order/list'
			});
		} else {
			uni.navigateTo({
				url: '/pages/group_course_order/list'
			});
		}
	}
}